
#ifndef LCD_H
#define LCD_H

#include "types.h"

/* Display driver for 8 digit LCD on Malta board       */
/* (See pages 14-16 of the Malta board's User's Guide) */
typedef struct
{
  uint8_t pad1[8];

  /* lcdBAR: 8 bits, 1 = LCD on */
  union {
    uint8_t reg;
    struct {
      uint8_t lcd0 : 1;
      uint8_t lcd1 : 1;
      uint8_t lcd2 : 1;
      uint8_t lcd3 : 1;
      uint8_t lcd4 : 1;
      uint8_t lcd5 : 1;
      uint8_t lcd6 : 1;
      uint8_t lcd7 : 1;
    } field;
  } lcdbar;
  uint8_t pad2[7];

  /* ASCIIWORD: Value written here will be displayed in hex */
  uint32_t asciiword;
  uint8_t  pad3[4];

  /* ASCIIPOSn : ASCII value for lcd position 'n'. */
  struct {
      uint8_t value;
      uint8_t pad[7];
  } asciipos[8];
} lcd_t;

#endif
